﻿<Window x:Class="XCase.Controller.Dialogs.GroupByDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Dialogs="clr-namespace:XCase.Controller.Dialogs"
	Title="Select descendants" WindowStartupLocation="CenterScreen" SizeToContent="WidthAndHeight" 
    ResizeMode="NoResize" Icon="/Controller;component/Dialogs/question_mark.png" ShowInTaskbar="False" Topmost="True">
	<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
		<StackPanel Margin="10" Name="stackPanel1">
            <StackPanel.Resources>
                <DataTemplate x:Key="classListTemplate" DataType="Dialogs:GroupBySelectorData">
                    <StackPanel Orientation="Horizontal">
                        <CheckBox IsChecked="{Binding Path=IsSelected}"/>
                        <TextBlock Text="{Binding Path=PSMClass.Name}" Margin="5,0,0,0"/>
                    </StackPanel>
                </DataTemplate>
            </StackPanel.Resources>
            <Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="40" />
					<ColumnDefinition Width="Auto" />
				</Grid.ColumnDefinitions>
				<Image Name="image1" Stretch="Fill"  Height="40" HorizontalAlignment="Left" VerticalAlignment="Top" Width="40" Source="question_mark.png" />
				<Label Name="textBlock1" Content="Choose descendants to group by" Margin="5" FontWeight="bold" Grid.Column="1" VerticalContentAlignment="Center" />
			</Grid>
            <ListBox Name="List" ItemTemplate="{StaticResource classListTemplate}" Margin="0,10,0,0"/>
            <Button Height="23" VerticalAlignment="Center" Name="bOK" Width="60" IsDefault="True" Click="bOK_Click" Margin="0,10,0,0">OK</Button>
        </StackPanel>
	</ScrollViewer>
</Window>
